package com.ruoyi.trade.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 成本网格对象 cost_grid
 * 
 * @author ruoyi
 * @date 2025-09-25
 */
public class CostGrid extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 唯一标识ID */
    private Long id;

    /** 网格节点价位 */
    @Excel(name = "网格节点价位")
    private Long gridNodePrice;

    /** 数量 */
    @Excel(name = "数量")
    private Long quantity;

    /** 实际成交价 */
    @Excel(name = "实际成交价")
    private BigDecimal actualTradePrice;

    /** 网格价格 */
    @Excel(name = "网格价格")
    private BigDecimal gridPrice;

    /** 手续费 */
    @Excel(name = "手续费")
    private BigDecimal fee;

    /** 证券持仓数量 */
    @Excel(name = "证券持仓数量")
    private Long securityHoldingQuantity;

    /** 成本价 */
    @Excel(name = "成本价")
    private BigDecimal costBasis;

    /** 可用资金数量 */
    @Excel(name = "可用资金数量")
    private BigDecimal availableCashBalance;

    /** 证券当前价格 */
    @Excel(name = "证券当前价格")
    private BigDecimal currentSecurityPrice;

    /** 合约价格 */
    @Excel(name = "合约价格")
    private BigDecimal contractPrice;

    /** 合约名称 */
    @Excel(name = "合约名称")
    private String contractName;

    /** 合约数量 */
    @Excel(name = "合约数量")
    private Long contractQuantity;

    /** 类别：0-认购，1-认沽 */
    @Excel(name = "类别：0-认购，1-认沽")
    private Integer optionType;

    /** 波动范围 */
    @Excel(name = "波动范围")
    private BigDecimal fluctuationRange;

    /** 公差 */
    @Excel(name = "公差")
    private Long commonDifference;

    /** 做空锁定数量 */
    @Excel(name = "做空锁定数量")
    private Long shortQuantity;

    /** 合约建仓年份 */
    @Excel(name = "合约建仓年份")
    private String contractInitiationYear;

    /** 投资信息id */
    @Excel(name = "投资信息id")
    private Long investmentId;

    /** 投资人姓名 */
    @Excel(name = "投资人姓名")
    private String investorName;

    /** 独立运营标识：0-否，1-是 */
    @Excel(name = "独立运营标识：0-否，1-是")
    private Integer independentFlag;

    /** 独立运营组 */
    @Excel(name = "独立运营组")
    private Long independentGroup;

    /** 计算标识：0-未参与计算，1-已参与计算 */
    @Excel(name = "计算标识：0-未参与计算，1-已参与计算")
    private Integer calculateFlag;


    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createdAt;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date updatedAt;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setGridNodePrice(Long gridNodePrice) 
    {
        this.gridNodePrice = gridNodePrice;
    }

    public Long getGridNodePrice() 
    {
        return gridNodePrice;
    }

    public void setQuantity(Long quantity) 
    {
        this.quantity = quantity;
    }

    public Long getQuantity() 
    {
        return quantity;
    }

    public void setActualTradePrice(BigDecimal actualTradePrice) 
    {
        this.actualTradePrice = actualTradePrice;
    }

    public BigDecimal getActualTradePrice() 
    {
        return actualTradePrice;
    }

    public void setGridPrice(BigDecimal gridPrice) 
    {
        this.gridPrice = gridPrice;
    }

    public BigDecimal getGridPrice() 
    {
        return gridPrice;
    }

    public void setFee(BigDecimal fee) 
    {
        this.fee = fee;
    }

    public BigDecimal getFee() 
    {
        return fee;
    }

    public void setSecurityHoldingQuantity(Long securityHoldingQuantity) 
    {
        this.securityHoldingQuantity = securityHoldingQuantity;
    }

    public Long getSecurityHoldingQuantity() 
    {
        return securityHoldingQuantity;
    }

    public void setCostBasis(BigDecimal costBasis) 
    {
        this.costBasis = costBasis;
    }

    public BigDecimal getCostBasis() 
    {
        return costBasis;
    }

    public void setAvailableCashBalance(BigDecimal availableCashBalance) 
    {
        this.availableCashBalance = availableCashBalance;
    }

    public BigDecimal getAvailableCashBalance() 
    {
        return availableCashBalance;
    }

    public void setCurrentSecurityPrice(BigDecimal currentSecurityPrice) 
    {
        this.currentSecurityPrice = currentSecurityPrice;
    }

    public BigDecimal getCurrentSecurityPrice() 
    {
        return currentSecurityPrice;
    }

    public void setContractPrice(BigDecimal contractPrice) 
    {
        this.contractPrice = contractPrice;
    }

    public BigDecimal getContractPrice() 
    {
        return contractPrice;
    }

    public void setContractName(String contractName) 
    {
        this.contractName = contractName;
    }

    public String getContractName() 
    {
        return contractName;
    }

    public void setContractQuantity(Long contractQuantity) 
    {
        this.contractQuantity = contractQuantity;
    }

    public Long getContractQuantity() 
    {
        return contractQuantity;
    }

    public void setOptionType(Integer optionType) 
    {
        this.optionType = optionType;
    }

    public Integer getOptionType() 
    {
        return optionType;
    }

    public void setFluctuationRange(BigDecimal fluctuationRange) 
    {
        this.fluctuationRange = fluctuationRange;
    }

    public BigDecimal getFluctuationRange() 
    {
        return fluctuationRange;
    }

    public void setCommonDifference(Long commonDifference) 
    {
        this.commonDifference = commonDifference;
    }

    public Long getCommonDifference() 
    {
        return commonDifference;
    }

    public void setShortQuantity(Long shortQuantity) 
    {
        this.shortQuantity = shortQuantity;
    }

    public Long getShortQuantity() 
    {
        return shortQuantity;
    }

    public void setContractInitiationYear(String contractInitiationYear) 
    {
        this.contractInitiationYear = contractInitiationYear;
    }

    public String getContractInitiationYear() 
    {
        return contractInitiationYear;
    }

    public void setInvestmentId(Long investmentId) 
    {
        this.investmentId = investmentId;
    }

    public Long getInvestmentId() 
    {
        return investmentId;
    }

    public void setInvestorName(String investorName) 
    {
        this.investorName = investorName;
    }

    public String getInvestorName() 
    {
        return investorName;
    }

    public void setIndependentFlag(Integer independentFlag) 
    {
        this.independentFlag = independentFlag;
    }

    public Integer getIndependentFlag() 
    {
        return independentFlag;
    }

    public Long getIndependentGroup() {return independentGroup;}

    public void setIndependentGroup(Long independentGroup) {this.independentGroup = independentGroup;}

    public Integer getCalculateFlag() {return calculateFlag;}

    public void setCalculateFlag(Integer calculateFlag) {this.calculateFlag = calculateFlag;}

    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }

    @Override
    public String toString() {
        return "CostGrid{" +
                "id=" + id +
                ", gridNodePrice=" + gridNodePrice +
                ", quantity=" + quantity +
                ", actualTradePrice=" + actualTradePrice +
                ", gridPrice=" + gridPrice +
                ", fee=" + fee +
                ", securityHoldingQuantity=" + securityHoldingQuantity +
                ", costBasis=" + costBasis +
                ", availableCashBalance=" + availableCashBalance +
                ", currentSecurityPrice=" + currentSecurityPrice +
                ", contractPrice=" + contractPrice +
                ", contractName='" + contractName + '\'' +
                ", contractQuantity=" + contractQuantity +
                ", optionType=" + optionType +
                ", fluctuationRange=" + fluctuationRange +
                ", commonDifference=" + commonDifference +
                ", shortQuantity=" + shortQuantity +
                ", contractInitiationYear='" + contractInitiationYear + '\'' +
                ", investmentId=" + investmentId +
                ", investorName='" + investorName + '\'' +
                ", independentFlag=" + independentFlag +
                ", independentGroup=" + independentGroup +
                ", calculateFlag=" + calculateFlag +
                ", createdAt=" + createdAt +
                ", updatedAt=" + updatedAt +
                '}';
    }
}